using MediatR;
using B.S.XZYData.ErrorCode;
using B.S.XZYData.Api.Read.DTO;
using System;

namespace B.S.XZYData.Api.Read.Application.Command.DefectiveSummary
{
    /// <summary>
    /// 获取不良品汇总命令
    /// </summary>
    public class GetDefectiveSummaryCommand : IRequest<ApiPageing<DefectiveSummaryDto>>
    {
        /// <summary>
        /// 页码
        /// </summary>
        public int Index { get; set; } = 1;

        /// <summary>
        /// 页大小
        /// </summary>
        public int Size { get; set; } = 30;

        /// <summary>
        /// 工单编号
        /// </summary>
        public string? WorkOrderCode { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        public string? ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string? ProductName { get; set; }

        /// <summary>
        /// 工序编号
        /// </summary>
        public string? ProcessCode { get; set; }

        /// <summary>
        /// 工序名称
        /// </summary>
        public string? ProcessName { get; set; }

        /// <summary>
        /// 生产人员
        /// </summary>
        public string? Producer { get; set; }

        /// <summary>
        /// 生产开始时间-开始
        /// </summary>
        public DateTime? ProductionStartTimeBegin { get; set; }

        /// <summary>
        /// 生产开始时间-结束
        /// </summary>
        public DateTime? ProductionStartTimeEnd { get; set; }

        /// <summary>
        /// 生产结束时间-开始
        /// </summary>
        public DateTime? ProductionEndTimeBegin { get; set; }

        /// <summary>
        /// 生产结束时间-结束
        /// </summary>
        public DateTime? ProductionEndTimeEnd { get; set; }

        /// <summary>
        /// 不良品项
        /// </summary>
        public string? DefectiveItem { get; set; }

        /// <summary>
        /// 工序计划数-最小值
        /// </summary>
        public int? ProcessPlanQuantityMin { get; set; }

        /// <summary>
        /// 工序计划数-最大值
        /// </summary>
        public int? ProcessPlanQuantityMax { get; set; }

        /// <summary>
        /// 报工数-最小值
        /// </summary>
        public int? ReportQuantityMin { get; set; }

        /// <summary>
        /// 报工数-最大值
        /// </summary>
        public int? ReportQuantityMax { get; set; }

        /// <summary>
        /// 良品数-最小值
        /// </summary>
        public int? QualifiedQuantityMin { get; set; }

        /// <summary>
        /// 良品数-最大值
        /// </summary>
        public int? QualifiedQuantityMax { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public string? SortField { get; set; }

        /// <summary>
        /// 排序方向 (asc/desc)
        /// </summary>
        public string? SortOrder { get; set; }
    }
} 